#pragma pack_matrix(row_major)

#include "Defs/types.hlsli"
#include "Defs/Textureing.hlsli"
#include "Defs/ConstantBuffers.hlsli"



differedPSOutput main(differedVSOutput input)
{
	differedPSOutput outval = (differedPSOutput)0;

	outval.diffuse = diffuseMap.Sample(linearClampSampler, input.uv);
	outval.normal = normalMap.Sample(linearClampSampler, input.uv);
	outval.normal = float4((outval.normal.xyz - 0.5f) * 2.f, 0.f);
	outval.normal = float4(mul(outval.normal.xyz, input.tbn).xyz, 1.f);
	outval.normal = (outval.normal + 1.f) / 2.f;
	outval.specular = specularMap.Sample(linearClampSampler, input.uv);
	outval.depth = input.depthDiv.x / input.depthDiv.y;

	return outval;
}